#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "protoolsstandard.h"
#include "settingsdialog.h"
#include "cssettingsinformation.h"
#include "licensedialog.h"
#include "databasefacade.h"
#include "csdatabaselogin.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void on_BtnMain_clicked();

    void on_BtnMain_10_clicked();

    void on_BtnMain_9_clicked();

    void on_BtnMain_8_clicked();

    void on_BtnMain_7_clicked();

    void on_BtnMain_6_clicked();

    void on_BtnMain_5_clicked();

    void on_BtnMain_4_clicked();

    void on_BtnMain_3_clicked();

    void on_BtnMain_2_clicked();

    void on_BtnMain_11_clicked();

    void on_actionSmall_Production_triggered();

    void on_actionLarge_Production_triggered();

    void on_actionSmall_Festival_triggered();

    void on_actionLarge_Festival_triggered();

    void on_actionE_xit_triggered();

    void on_btnVenues_clicked();

    void on_btnArtists_clicked();

    void on_btnSetDate_clicked();

    void on_btnProd_clicked();

    void on_btnProductionStaff_clicked();

    void on_btnAdminCosts_clicked();

    void on_btnMarketingCosts_clicked();

    void on_btnSecurityCosts_clicked();

    void on_btnOperationsCosts_clicked();

    void on_btnEditTickets_clicked();

    void on_btnTaxRates_clicked();

    void on_btnAddVenue_clicked();

    void on_btnRemoveVenue_clicked();

    void on_btnAddArtist_clicked();

    void on_btnRemoveArtist_clicked();

    void on_btnAddDate_clicked();

    void on_btnRemoveDate_clicked();

    void on__ProdText1_0_lostFocus();

    void on__ProdText1_1_lostFocus();

    void on__ProdText1_2_lostFocus();

    void on__ProdText1_3_lostFocus();

    void on__ProdText1_4_lostFocus();

    void on__ProdText1_5_lostFocus();

    void on__ProdText1_6_lostFocus();

    void on__txtStaff_0_lostFocus();

    void on__txtStaff_1_lostFocus();

    void on__txtAdmin_0_lostFocus();

    void on__txtAdmin_1_lostFocus();

    void on__txtAdmin_2_lostFocus();

    void on__txtAdmin_3_lostFocus();

    void on__txtAdmin_4_lostFocus();

    void on__txtAdmin_5_lostFocus();

    void on__txtAdmin_6_lostFocus();

    void on__txtAdmin_7_lostFocus();

    void on__txtAdmin_8_lostFocus();

    void on__txtAdmin_9_lostFocus();

    void on__txtAdmin_10_lostFocus();

    void on__txtAdmin_11_lostFocus();

    void on__txtAdmin_12_lostFocus();

    void on__txtAdmin_13_lostFocus();

    void on__txtMktg_0_lostFocus();

    void on__txtMktg_1_lostFocus();

    void on__txtMktg_2_lostFocus();

    void on__txtSec_0_lostFocus();

    void on__txtSec_1_lostFocus();

    void on__txtSec_2_lostFocus();

    void on__txtSec_3_lostFocus();

    void on__txtSec_4_lostFocus();

    void on__txtOps_0_lostFocus();

    void on__txtOps_1_lostFocus();

    void on__txtOps_2_lostFocus();

    void on__txtOps_3_lostFocus();

    void on__txtOps_4_lostFocus();

    void on__txtOps_5_lostFocus();

    void on__txtOps_6_lostFocus();

    void on__txtOps_7_lostFocus();

    void on__txtOps_8_lostFocus();

    void on__txtOps_9_lostFocus();

    void on__txtOps_10_lostFocus();

    void on__txtOps_11_lostFocus();

    void on__txtOps_12_lostFocus();

    void on__txtOps_13_lostFocus();

    void on__txtOps_14_lostFocus();

    void on_btnAddTicket_clicked();

    void on_btnRemoveTicket_clicked();

    void on_btnAddTax_clicked();

    void on_btnRemoveTax_clicked();

    void on_actionNew_triggered();

    void on_action_About_triggered();

    void on_txtTicketComm_lostFocus();

    void on_action_Open_triggered();

    void on_action_Save_triggered();

    void on_actionS_ave_As_triggered();

    void on_lstTickets_currentRowChanged(int currentRow);

    void on_lstVenues_currentRowChanged(int currentRow);

    void on_lstArtists_currentRowChanged(int currentRow);

    void on_lstPerformaceDates_currentRowChanged(int currentRow);

    void on_lstTaxes_currentRowChanged(int currentRow);

    void on_actionPlain_Text_triggered();

    void on_actionHTML_Report_triggered();

    void on_actionPDF_triggered();

    void on_actionLicense_triggered();

    void on_license_selected_ok();

    void on_actionDatabase_Settings_triggered();

    void on_DatabaseSettingsUpdated();

    void on_DatabaseSettingsAborted();

    void on_txtProductionName_lostFocus();

    void on_LoggedIn();

    void on_NotLoggedIn();

    void on_Canceled();

    void on_SingleFile();

private:
    Ui::MainWindow *ui;

    ProtoolsStandard *ourProtoolsObject;

    bool HasChanged;

    QString fileString;

    void GoToMainTab();

    void SetupConcertTabs();

    void UpdateProtoolsObject();

    void ClearOutTheScreen();

    bool SaveFile();

    void SetCurrentFile(const QString &fileName);

    void GetCurrentFile();

    QStringList GenerateHTML();

    QStringList GeneratePlainText();

    bool IsDeletingTickets;

    bool IsDeletingArtists;

    bool IsDeletingVenues;

    bool IsDeletingDates;

    bool IsDeletingTaxes;

    SettingsDialog *sd;

    CSSettingsInformation *sds;

    LicenseDialog *ld;

    DataBaseFacade *df;

    bool IsNew;

    bool IsLoggedIn;

    bool IsSingleFile;

    bool IsSingleFileStored;

    CSDatabaseLogin *dbl;

    void DisconnectLoginDialog();
};

#endif // MAINWINDOW_H
